package com.woniuxy.carrental.service.impl;

import com.woniuxy.carrental.entity.Supply_car;
import com.woniuxy.carrental.mapper.Supply_carMapper;
import com.woniuxy.carrental.service.SupplyCarService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author xilei
 * @create 2021-10-03 下午 7:56
 */
@Service
public class SupplyCarServiceImpl implements SupplyCarService {

    @Resource
    Supply_carMapper supply_carMapper;

    @Override
    public List<Supply_car> findSupply_car() {
        List<Supply_car> list = supply_carMapper.findSupply_car();
        return list;
    }

    @Override
    public List<Supply_car> findSupply_carBysupplier_id(Integer supplier_id) {
        List<Supply_car> list = supply_carMapper.findSupply_carBysupplier_id(supplier_id);
        return list;
    }

    @Override
    public Supply_car findSupply_carBysupply_id(Integer supply_id) {
        Supply_car supply_car = supply_carMapper.findSupply_carBysupply_id(supply_id);
        return supply_car;
    }

    @Override
    public List<Supply_car> findSupply_carBycar_id(Integer pageIndex, Integer pageSize) {
        List<Supply_car> list = supply_carMapper.findSupply_carBycar_id(pageIndex,pageSize);
        return list;
    }

    @Override
    public List<Supply_car> findSupply_carBy(Integer pageIndex, Integer pageSize, Integer car_id) {
        List<Supply_car> list = supply_carMapper.findSupply_carBy(pageIndex, pageSize, car_id);
        return list;
    }


    @Override
    public List<Supply_car> findSupply_carByPage(int pageIndex, int pageSize) {
        List<Supply_car> list = supply_carMapper.findSupply_carByPage(pageIndex, pageSize);
        return list;
    }

    @Override
    public List<Supply_car> findSupply_carByPageByParam(Integer car_id, Integer supplier_id, Integer sprice, int pageIndex, int pageSize) {
        List<Supply_car> list = supply_carMapper.findSupply_carByPageByParam(car_id, supplier_id, sprice, pageIndex, pageSize);
        return list;
    }

    @Override
    public void updateSupply_car(Integer car_id, Integer supplier_id, Integer sprice, Integer allcount) {
        supply_carMapper.updateSupply_car(car_id, supplier_id, sprice, allcount);
    }

    @Override
    public void updateSupply_carBysupply_id(Integer supply_id, Integer allcount) {
        supply_carMapper.updateSupply_carBysupply_id(supply_id, allcount);
    }

    @Override
    public void deleteSupply_car(Integer supply_id) {
        supply_carMapper.deleteSupply_car(supply_id);
    }

    @Override
    public void insertSupply_car(Supply_car supply_car) {
        supply_carMapper.insertSupply_car(supply_car);
    }
}
